<html>
  <body>
  <h2>PSHB Feeds currently monitored:</h2>
    {% if bookmark %}
    <a href="{{ first_page }}">[First Page]</a>&nbsp;
    {% endif %}
    {% if next %}
      <a href="?bookmark={{ next }}">[Next Page]</a>
    {% endif %}
    <p>
    {% if admin_user %}
    <form action="/pshb/admin" method="post">
    <p>To add a feed which references a hub, fill in the text box below and
     then click <input type="submit" name="add_feed" value="Add">.<br>
    Feed Url: <textarea name="subscribe" rows="1" cols="60"></textarea></p>
    {% if message %}
    <p style="color:red">{{ message }}</p>
    {%endif %}
    <p>To delete a feed, click its checkbox below and then
    click <input type="submit" name="delete_feed" value="Delete"></p>
    {% endif %}
    {% for feed in feeds %}
      {% if admin_user %}
      <input type="checkbox" name="unsubscribe" value="{{feed.key.name}}">
      {% endif %}
      <a href='{{ feed.key.name }}'>{{ feed.title|escape }}</a><br>
      {% if admin_user %}
      Last Verified: {{ feed.verified }}<br>
      Expires: {{ feed.expiration }}<br>
      Hub: {{ feed.hub|escape }}<br>
      {% endif %}
    {% endfor %}
    {% if admin_user %}
    </form>
    <p>Memcache Stats</p>
    <table>
      <tr><td>Hits</td><td>{{ memcache_stats.hits }}</td></tr>
      <tr><td>Items</td><td>{{ memcache_stats.items }}</td></tr>
      <tr><td>Bytes</td><td>{{ memcache_stats.bytes }}</td></tr>
      <tr><td>Oldest_item_age</td><td>{{ memcache_stats.oldest_item_age }}</td></tr>
      <tr><td>Misses</td><td>{{ memcache_stats.misses }}</td></tr>
      <tr><td>byte_hits</td><td>{{ memcache_stats.byte_hits }}</td></tr>
    </table>
    {% endif %}
  </body>
</html>
